﻿@model PagedList<RBS.Core.Model.Hotel.H_Hotel_Seat>
@using Webdiyer.WebControls.Mvc
@{
    ViewBag.Title = "座位信息表";
    Layout = "~/Views/Shared/_Layout.cshtml"; 
}
<script>
    $(function () {
       
    }); 
    //加载预定信息 
    function GetOrderList(seatId, hotelid) {
        alert(seatId);
        var url = "@Url.Action("GetSeat")?hid=" + @Model.H_Id +"&type=" + encodeURIComponent(dineValue);
        var dine = dineValue;
        $.ajax({
            url: url,
            type: 'Post',
            dataType: 'json',
            success: function (result) {
                if (result == null)
                    return;
                $("#seatUl").empty();
                $.each(result.Data, function (index, row) {

                    var ss = "";
                    if (row.Id == $("#DineTable").val()) {
                        ss = "checked";
                    }
                    row.s = ss;
                    var template = $('#SeatTemplate').html(); //获取模版的html

                    var bookData = Mustache.render(template, row);//把每行的数据填充到模版得到html内容
                    $("#seatUl").append(bookData);
                });
            }
        });
    } 
    //加载菜单信息 
</script>
 
 
<!--导航栏-->
@{
    @Html.Partial("_Location");
}
<!--/导航栏--> 
<!--工具栏-->
<div class="toolbar-wrap">
    <div id="floatHead" class="toolbar">
       
    </div>
</div>
<!--/工具栏--> 
<!--列表--> 
<style>
       .seat{ width: 100%;float: left;width: 69%;border: 1px solid red;height: 550px}
       .seat #seatList {border: 1px solid red;height: 300px; overflow-y: scroll}
        .seat #orderList {border: 1px solid red; height: 200px; overflow-y: scroll}
       .seat #seatList ul{ width: 100%;}
        .seat #seatList ul li{ width:120px;height: 120px;border: solid 1px red; float: left; margin:5px 5px}
        .seat #seatList ul li img{ width:120px;height: 100px;
        }
        .OrderDetails{float: right;width: 30%;border: 1px solid red;height:550px}
</style>
<div class="seat" >
    <div id="seatList"> 
        @if (null != ViewData.Model)
        {
            foreach (var item in ViewData.Model)
            {
                <ul>
                <li  onclick="GetOrderList(@item.Id,@item.HotelId)">  
                        <input id="hidId" type="hidden" value="@item.Id"/> 
                        @*   @Html.DisplayFor(modelItem => item.RoomNumber)
           @Html.DisplayFor(modelItem => item.Name)
            @Html.DisplayFor(modelItem => item.Floor)
            @Html.DisplayFor(modelItem => item.Category)
            @Html.DisplayFor(modelItem => item.Numbers)
           @Html.DisplayFor(modelItem => item.Picture)
            @(item.AOBT==1?"是":"否") 
         @Html.ActionLink("编辑", "HotelSeatEdit", new { id = item.Id, action = @RBS.Common.RBSEnums.ActionEnum.Edit })*@ 
                        <img src="../@item.Picture" />
                        <div>
                            @(item.AOBT==1?"可用":"不可用")  
                        </div>
                    </li> 
                </ul>
            } 
        } 
    </div>
    <div class="line20"></div>
    <div id="orderList" style="width: 100%">
        <ul>
            <li>2111</li>
        </ul>
    </div>
    </div>

<div class="OrderDetails" >
    <div>
        <ul>
            <li>餐台名称：</li>
            <li>开台时间：</li>
            <li>顾客人数:</li>
            <li>合计消费：</li>
            <li>消费备注：</li>
        </ul>
    </div>
    <div>
        orderlist
    </div>
     <div>
         
    </div>

</div>
<!--/列表--> 
<!--内容底部-->
<div class="line20">
</div>
@*<div class="pagelist">
    <div class="l-btns">
        <span>显示</span> <span>10 条/页</span><span>共 @Model.TotalPageCount 页 @Model.TotalItemCount 条记录，当前为第 @Model.CurrentPageIndex 页</span>
    </div>
    @Html.Pager(Model, new PagerOptions { PageIndexParameterName = "id", ShowPageIndexBox = true, PageIndexBoxType = PageIndexBoxType.DropDownList, ShowGoButton = false, CurrentPagerItemWrapperFormatString = "<span class=\"current\">{0}</span>" }, new { id = "PageContent", @class = "default" })
    @section Scripts{@{Html.RegisterMvcPagerScriptResource();}}
</div> *@
<!--/内容底部-->
 
 
 